<template>
	<view>
		<view class="right-menu">
			<view class="right-menu-content" v-for="(item, index) in rightMenu" :key="index" :id="'po'+index">
				<view class="title font26">{{item.name}}</view>
				<view class="right-menu-content-list uni-flex" @tap="goJournalList()">
					<view class="right-menu-content-item" v-for="(i, ind) in item.menuList" :key="ind">
						<uni-icons color="#007aff" :type="i.icon" size="22"></uni-icons>
						<view class="text font22">{{i.text}}</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import uniIcons from '@/components/uni-icons/uni-icons.vue'
	export default {
		components: {
			uniIcons
		},
		props: {
			// 列表数据
			rightMenu: {
				type: Array,
				default:() => {
					return []
				}
			}
		},
		data() {
			return {}
		},
		methods: {
			goJournalList() {
				uni.navigateTo({
					url: '/pages/journal/index'
				})
			},
		}
	}
</script>

<style lang="scss">
	.right-menu {
		.title{
			text-align: center;
			padding:20rpx 0 ;
			position: relative;
			&::before{
				content: '';
				width: 120rpx;
				height: 1rpx;
				background: #ddd;
				position:absolute;
				display: inline-block;
				left:15%;
				top:50%;
			}
			&::after{
				content: '';
				width: 120rpx;
				height: 1rpx;
				background: #ddd;
				position:absolute;
				display: inline-block;
				right:15%;
				top:50%;
			}
		}
		.right-menu-content-list{
			flex-wrap: wrap;
		}
		.right-menu-content-item {
			width: 33.3%;
			margin-bottom: 20rpx;
			text-align: center;
		}
	}
</style>
